package com.CMS.server;

import java.util.List;

import com.CMS.client.PrivilegeTypeService;
import com.CMS.server.dao.PrivilegeTypeDao;
import com.CMS.server.domain.PrivilegeType;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class RpcType extends RemoteServiceServlet implements PrivilegeTypeService{

	/**
	 * 
	 */
	private static final long serialVersionUID = 5804791345039778552L;

	@Override
	public List<PrivilegeType> fetch() {
		PrivilegeTypeDao dao = new PrivilegeTypeDao();
		return dao.getAll();
	}

	@Override
	public void create(PrivilegeType tipo) {
		PrivilegeTypeDao dao = new PrivilegeTypeDao();
		dao.createEntity(tipo);
	}

}
